import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {HttpService} from 'itcloud-plugin';
import {ReplaySubject} from 'rxjs/ReplaySubject';
import {Subject} from 'rxjs/Subject';

@Injectable()

export class DemoCommonService {
    constructor(private http: HttpService) {
    }

    // 用户信息存储
    private userInfo: Subject<any> = new ReplaySubject(1);
    // demo数据存储
    private demoData: Subject<any> = new ReplaySubject(1);

    getUserInfo(): Subject<any> {
        return this.userInfo;
    }

    getDemoData(): Subject<any> {
        return this.demoData;
    }
}
